In [ ]:
color_sequence = ["#32DACF","#7630EF","#00526F","#7FF9E2","#C14DFF","#FF8300","#FEC901"]
In [ ]:
from IPython.display import HTML

HTML('''<script>
code_show=true; 
function code_toggle() {
 if (code_show){
 $('div.input').hide();
 } else {
 $('div.input').show();
 }
 code_show = !code_show
} 
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>''')
Out[ ]:
In [ ]:
import pandas as pd
import os

vols_df = pd.read_csv('sunburst_data.csv')
snaps_orphaned = vols_df[vols_df.VolumeId.isnull()]
vols_df = vols_df[vols_df.VolumeId.notnull()]
#vols_df

def create_html(figure, name):
    if(os.path.exists("static/data/"+name+".html")):
        os.remove("static/data/"+name+".html")
    
    figure.write_html("static/data/"+name+".html")

Statistics and Counters¶

# Volumes, Snapshots, Un attached and Attached EBS Volumes
# Volumes, Snapshots for On Prem Volumes
In [ ]:
EBSVols = vols_df[vols_df['volumeType']=='EBS']
onPremVols = vols_df[vols_df['volumeType']=='OnPrem']
ebsVolCount = EBSVols['VolumeId'].nunique()
ebsVOLSnapshots = EBSVols['snapshotId'].nunique()
onPremVolCount = onPremVols['VolumeId'].nunique()
onPremVOLSnapshots = onPremVols['snapshotId'].nunique()
unattachedEBSVols = EBSVols[EBSVols['isAttached']==False]['VolumeId'].nunique()
unattachedOnPremVols = onPremVols[onPremVols['isAttached']==False]['VolumeId'].nunique()
from tabulate import tabulate
infoEBS = {'Volume Type': ['Total Volumes', 'Unattached EBS Volumes', 'Total Snapshots', 'Orphaned Snapshots'], 
        'EBS': [ebsVolCount, unattachedEBSVols, ebsVOLSnapshots, snaps_orphaned.nunique().snapshotId ]}
infoOnPrem = {'Volume Type': ['Total Volumes', 'Unattached OnPrem Volumes', 'Total Snapshots'], 
        'OnPrem': [onPremVolCount, unattachedOnPremVols, onPremVOLSnapshots ]}

for i in range(len(infoEBS["EBS"])):
        infoEBS["EBS"][i] = int(infoEBS["EBS"][i])

# print(infoEBS)

import json
json_data = json.dumps(infoEBS)


json_data = 'json_data = \'' + json_data + '\''
print(json_data)

with open("static/data.json","w") as outfile:
        outfile.write(json_data)

print(tabulate(infoEBS, headers='keys',tablefmt='fancy_grid'))
print(tabulate(infoOnPrem, headers='keys',tablefmt='fancy_grid'))
json_data = '{"Volume Type": ["Total Volumes", "Unattached EBS Volumes", "Total Snapshots", "Orphaned Snapshots"], "EBS": [5, 3, 47, 13]}'
╒════════════════════════╤═══════╕
│ Volume Type            │   EBS │
╞════════════════════════╪═══════╡
│ Total Volumes          │     5 │
├────────────────────────┼───────┤
│ Unattached EBS Volumes │     3 │
├────────────────────────┼───────┤
│ Total Snapshots        │    47 │
├────────────────────────┼───────┤
│ Orphaned Snapshots     │    13 │
╘════════════════════════╧═══════╛
╒═══════════════════════════╤══════════╕
│ Volume Type               │   OnPrem │
╞═══════════════════════════╪══════════╡
│ Total Volumes             │        2 │
├───────────────────────────┼──────────┤
│ Unattached OnPrem Volumes │        0 │
├───────────────────────────┼──────────┤
│ Total Snapshots           │       12 │
╘═══════════════════════════╧══════════╛
In [ ]:
#vols_df['vol_creation_time']= pd.to_datetime(vols_df['vol_creation_time'], utc=True).ini_time_for_now
from datetime import datetime, timedelta
vols_df['vol_creation_time'] = vols_df['vol_creation_time'].apply(lambda x: pd.to_datetime(x).tz_localize(None))
# Using current time
ini_time_for_now = datetime.utcnow()
vols_df['volumeAgeDays']=vols_df['vol_creation_time'].apply(lambda x: (ini_time_for_now -x ).days)
#vols_df.info()
#vols_df
In [ ]:
import plotly.io as pio
pio.renderers.default = "notebook"

Region Distribution of EBS Volumes - Stack Rank by Volume age vs IOPS¶

# This graph shows the distribution of the EBS volumes in different Regions and stack ranks between IOPS and Volume Age
# Shows volume age vs iops distribution for different regions
In [ ]:
 
In [ ]:
import plotly.express as px


fig = px.scatter(vols_df, x="volumeAgeDays", y="iops",
	         size="volumeSize", color="Region",
                 hover_name="VolumeId", log_x=True, size_max=60, color_discrete_sequence=color_sequence)
create_html(fig,"region_distribution")

fig.show()

Consumption EBS and OnPrem Volume¶

  • Displays the size footprint for various asset types( Attached/Unattached EBS and OnPrem Volumes)
In [ ]:
import plotly.express as px
import numpy as np
vols_grouped = vols_df.groupby(['volumeType','isAttached'])
vols_grouped = vols_grouped.sum().reset_index()
vols_grouped
vols_grouped['assetType'] = np.where((vols_grouped['volumeType'] == 'EBS') & (vols_grouped['isAttached'] == True), 'AttachedEBS',
                   np.where((vols_grouped['volumeType'] == 'OnPrem') & (vols_grouped['isAttached'] == True), 'AttachedOnPrem',
                   np.where((vols_grouped['volumeType'] == 'EBS') & (vols_grouped['isAttached'] == False), 'UnattachedEBS', 'UnattachedOnPrem')))
vols_grouped
fig = px.bar(vols_grouped, x='assetType', y='volumeSize',
             hover_data=['Cost', 'volumeSize'], color='assetType',
             height=400, color_discrete_sequence=color_sequence)

create_html(fig,"consumption_1")

fig.show()

#df = px.data.tips() # replace with your own data source


# fig_consumption = px.pie(vols_grouped,  hole=.3)
# fig_consumption.show()
In [ ]:
import plotly.express as px
vols_grouped = vols_df.groupby(['volumeType','isAttached'])
vols_grouped = vols_grouped.sum().reset_index()
vols_grouped
vols_grouped['assetType'] = np.where((vols_grouped['volumeType'] == 'EBS') & (vols_grouped['isAttached'] == True), 'AttachedEBS',
                   np.where((vols_grouped['volumeType'] == 'OnPrem') & (vols_grouped['isAttached'] == True), 'AttachedOnPrem',
                   np.where((vols_grouped['volumeType'] == 'EBS') & (vols_grouped['isAttached'] == False), 'UnattachedEBS', 'UnattachedOnPrem')))
vols_grouped
fig = px.pie(vols_grouped, hole=.8, values='volumeSize', names='assetType', title='Distribution of attached/unattached EBS, Onprem volumes', hover_data=['Cost'], color_discrete_sequence=color_sequence)

create_html(fig,"consumption_2")

fig.show()

Trends on EBS Volume Consumption and IOPS¶

  • Displays avg EBS volume footprint and IOPS trends
In [ ]:
import plotly.graph_objects as go
vols_capacity_trend_df = pd.read_csv('volume_capacity_iops_trend.csv')
vols_capacity_trend_df_final = vols_capacity_trend_df.sort_values('reportDate')
Date = vols_capacity_trend_df_final['reportDate']
IOps = vols_capacity_trend_df_final['iops_avg']
read_iops = vols_capacity_trend_df_final['read_iops_avg']
write_iops = vols_capacity_trend_df_final['write_iops_avg']
GiB = vols_capacity_trend_df_final['volumeUsedSize(GiB)']

# centre = (min(IOps)+max(IOps))/2
# mul=0.7

# for i in range(len(IOps)):
# #     print(val)
#     val=IOps[i]
#     if val>centre:
#         val = val - abs(val-centre)*mul
#     else:
#         val = val + abs(val-centre)*mul
#     IOps[i]=val

# print(IOps)

df = pd.DataFrame(list(zip( IOps , GiB, read_iops, write_iops )),
                  index = Date ,
                columns = [ 'IOps' , 'GiB', 'read_iops', 'write_iops' ]).reset_index()  
from plotly.subplots import make_subplots

# Create figure with secondary y-axis
fig = make_subplots()

# Add traces
fig.add_trace(
    go.Scatter(x=df['reportDate'], y=df['IOps'], name="IOPS",line=dict(shape='spline',color=color_sequence[1]))
)

# Add figure title
# fig.update_layout(
#     title_text="Volume footprint and IOPS trends"
# )

# Set x-axis title
fig.update_xaxes(title_text="Report Date")

# Set y-axes titles
fig.update_yaxes(title_text="<b>IOPS</b>")

create_html(fig,"trend_1_1")

fig.show()
In [ ]:
fig = make_subplots()

# Add trace
fig.add_trace(
    go.Scatter(x=df['reportDate'], y=df['GiB'], name="Volume used capacity(GB)",line=dict(shape='spline',color=color_sequence[5]))
)

# Add figure title
# fig.update_layout(
#     title_text="Volume footprint and IOPS trends"
# )

# Set x-axis title
fig.update_xaxes(title_text="Report Date")

# Set y-axes titles
fig.update_yaxes(title_text="<b>Used capacity (GB)</b>")

create_html(fig,"trend_1_2")

fig.show()

EBS volumes Read IO and write IO Trends¶

  • Displays avg EBS volume footprint and IOPS trends
In [ ]:
fig = make_subplots()

# Add traces
fig.add_trace(
    go.Scatter(x=df['reportDate'], y=df['read_iops'], name="Avg Read IOPS",line=dict(shape='spline',color=color_sequence[1])),
)

# Add figure title
fig.update_layout(
    title_text="Volume Read IOPS trends"
)

# Set x-axis title
fig.update_xaxes(title_text="Report Date")

# Set y-axes titles
fig.update_yaxes(title_text="<b>Read IOPS</b>")

create_html(fig,"trend_2_1")

fig.show()
In [ ]:
fig = make_subplots()

# Add traces

fig.add_trace(
    go.Scatter(x=df['reportDate'], y=df['write_iops'], name="Avg Write IOPS",line=dict(shape='spline',color=color_sequence[5])),
)

# Add figure title
fig.update_layout(
    title_text="Volume Write IOPS trends"
)

# Set x-axis title
fig.update_xaxes(title_text="Report Date")

# Set y-axes titles
fig.update_yaxes(title_text="<b>Write IOPS</b>")

create_html(fig,"trend_2_2")

fig.show()

Stack Rank IOPS, Age on EBS and OnPrem¶

  • Shows age of the volumes vs the IOPS (Bubble size correspons to the volume size)
In [ ]:
import plotly.express as px


fig = px.scatter(vols_df, x="volumeAgeDays", y="iops",
	         size="volumeSize", color="volumeType",
                 hover_name="VolumeId", log_x=True, size_max=60,color_discrete_sequence=color_sequence)

create_html(fig,"trend_3")

fig.show()

EBS Volume and Snapshot distributions for a customer¶

(Green for attached, Orange for unattached).

  • Shows the customer lineage (Customer -> Volumes(Attached/ Unattached) -> Snapshots
In [ ]:
import plotly.express as px
customerId = vols_df['CustomerId']
volumeId = vols_df['VolumeId']
snapshotId = vols_df['snapshotId']
isAttached = vols_df['isAttached']
df_final = pd.DataFrame(
    dict(customerId=customerId, volumeId=volumeId,snapshotId=snapshotId,isAttached = isAttached)
)
df_final
fig1 = px.treemap(df_final, path=['customerId', 'volumeId', 'snapshotId'], color='isAttached',
                 hover_data=['customerId', 'volumeId', 'snapshotId']
                  ,color_discrete_sequence=color_sequence)
#                 color_discrete_map={False:'blue', True:'lightgreen'})
fig1.update_traces(root_color="blue")
fig1.update_layout(margin = dict(t=50, l=25, r=25, b=25))

create_html(fig1,"trend_4")

fig1.show("notebook")

Cost Distribution EBS Vs OnPrem¶

  • Shows volumetype distribution(EBS/OnPrem) based on cost and the corresponding snapshot lineage
In [ ]:
import plotly.express as px
import numpy as np

continous_color_pallete = [color_sequence[3],color_sequence[0],color_sequence[1],color_sequence[2]]

fig = px.sunburst(vols_df, path=['volumeType', 'VolumeId','snapshotId'], width=750, height=750,
                    color_continuous_scale=continous_color_pallete
#                   color_continuous_scale="RdYlGn"
                  ,values='Cost', color='Cost')

create_html(fig,"cost_1")

fig.show()

Volume Consumption OnPrem Vs EBS¶

  • Shows volumetype distribution(EBS/OnPrem) based on volumeSize and the corresponding snapshot lineage
In [ ]:
import plotly.express as px
import numpy as np
fig = px.sunburst(vols_df, path=['volumeType', 'VolumeId','snapshotId'], width=750, height=750,
                  color_continuous_scale=continous_color_pallete
#                   color_continuous_scale="RdBu"
                  ,values='volumeSize', color='volumeSize')

create_html(fig,"cost_2")

fig.show()
In [ ]:
vols_df
Out[ ]:
CustomerId VolumeId volumeType volumeSize snapshotId vol_creation_time iops snap_creation_time isAttached Cost Region volumeAgeDays
0 CUST_00 vol-03a14dfdaf5c6722b EBS 50.0 snap-0ed7eb835e8501dfa 2022-04-02 09:25:15.971 10.0 2022-04-25T09:25:15.971000+00:00 True 200.0 Europe 75
1 CUST_00 vol-03a14dfdaf5c6722b EBS 50.0 snap-0ed7eb835e8501dfb 2022-04-02 09:25:15.971 10.0 2022-04-25T09:25:15.971000+00:00 True 200.0 Europe 75
2 CUST_00 vol-03a14dfdaf5c6722b EBS 50.0 snap-0ed7eb835e8501dfc 2022-04-02 09:25:15.971 10.0 2022-04-25T09:25:15.971000+00:00 True 200.0 Europe 75
3 CUST_00 vol-03a14dfdaf5c6722b EBS 50.0 snap-0ed7eb835e8501dfd 2022-04-02 09:25:15.971 10.0 2022-04-25T09:25:15.971000+00:00 True 200.0 Europe 75
4 CUST_00 vol-03a14dfdaf5c6722b EBS 50.0 snap-0ed7eb835e8501dfe 2022-04-02 09:25:15.971 10.0 2022-04-25T09:25:15.971000+00:00 True 200.0 Europe 75
5 CUST_00 vol-03a14dfdaf5c6722b EBS 50.0 snap-0ed7eb835e8501dff 2022-04-02 09:25:15.971 10.0 2022-04-25T09:25:15.971000+00:00 True 200.0 Europe 75
6 CUST_00 vol-03a14dfdaf5c6723C EBS 200.0 snap-0ed7eb835e8501dgb 2022-02-02 09:25:15.971 100.0 2022-04-25T09:26:15.971000+00:00 False 600.0 Asia 134
7 CUST_00 vol-03a14dfdaf5c6723C EBS 200.0 snap-0ed7eb835e8501dgc 2022-02-02 09:25:15.971 100.0 2022-04-25T09:26:15.971000+00:01 False 600.0 Asia 134
8 CUST_00 vol-03a14dfdaf5c6723C EBS 200.0 snap-0ed7eb835e8501dgd 2022-02-02 09:25:15.971 100.0 2022-04-25T09:26:15.971000+00:02 False 600.0 Asia 134
9 CUST_00 vol-03a14dfdaf5c6723C EBS 200.0 snap-0ed7eb835e8501dge 2022-02-02 09:25:15.971 100.0 2022-04-25T09:26:15.971000+00:03 False 600.0 Asia 134
10 CUST_00 vol-03a14dfdaf5c6723C EBS 200.0 snap-0ed7eb835e8501dgf 2022-02-02 09:25:15.971 100.0 2022-04-25T09:26:15.971000+00:04 False 600.0 Asia 134
11 CUST_00 vol-03a14dfdaf5c6723C EBS 200.0 snap-0ed7eb835e8501dgh 2022-02-02 09:25:15.971 100.0 2022-04-25T09:26:15.971000+00:05 False 600.0 Asia 134
12 CUST_00 vol-03a14dfdaf5c6723C EBS 200.0 snap-0ed7eb835e8501dgi 2022-02-02 09:25:15.971 100.0 2022-04-25T09:26:15.971000+00:06 False 600.0 Asia 134
13 CUST_00 vol-03a14dfdaf5c6723C EBS 200.0 snap-0ed7eb835e8501dgj 2022-02-02 09:25:15.971 100.0 2022-04-25T09:26:15.971000+00:07 False 600.0 Asia 134
14 CUST_00 vol-03a14dfdaf5c6734d OnPrem 300.0 snap-0ed7eb835e8501hm0 2021-11-26 09:26:15.971 400.0 2022-04-26T09:26:15.971000+00:07 True 1340.0 Asia 202
15 CUST_00 vol-03a14dfdaf5c6734d OnPrem 300.0 snap-0ed7eb835e8501hm1 2021-11-26 09:26:15.971 400.0 2022-04-26T09:26:15.971000+00:07 True 1340.0 Asia 202
16 CUST_00 vol-03a14dfdaf5c6734d OnPrem 300.0 snap-0ed7eb835e8501hm2 2021-11-26 09:26:15.971 400.0 2022-04-26T09:26:15.971000+00:07 True 1340.0 Asia 202
17 CUST_00 vol-03a14dfdaf5c6734d OnPrem 300.0 snap-0ed7eb835e8501hm3 2021-11-26 09:26:15.971 400.0 2022-04-26T09:26:15.971000+00:07 True 1340.0 Asia 202
18 CUST_00 vol-03a14dfdaf5c6734d OnPrem 300.0 snap-0ed7eb835e8501hm4 2021-11-26 09:26:15.971 400.0 2022-04-26T09:26:15.971000+00:07 True 1340.0 Asia 202
19 CUST_00 vol-03a14dfdaf5c6734d OnPrem 300.0 snap-0ed7eb835e8501hm5 2021-11-26 09:26:15.971 400.0 2022-04-26T09:26:15.971000+00:07 True 1340.0 Asia 202
20 CUST_00 vol-03a14dfdaf5c6734d OnPrem 300.0 snap-0ed7eb835e8501hm6 2021-11-26 09:26:15.971 400.0 2022-04-26T09:26:15.971000+00:07 True 1340.0 Asia 202
21 CUST_00 vol-03a14dfdaf5c6700f EBS 100.0 snap-0ed7eb835e8501hm7 2022-03-06 09:26:15.971 500.0 2022-04-26T09:26:15.971000+00:07 False 600.0 Europe 102
22 CUST_00 vol-03a14dfdaf5c6700f EBS 100.0 snap-0ed7eb835e8501hm8 2022-03-06 09:26:15.971 500.0 2022-04-26T09:26:15.971000+00:07 False 600.0 Europe 102
23 CUST_00 vol-03a14dfdaf5c6700f EBS 100.0 snap-0ed7eb835e8501hm9 2022-03-06 09:26:15.971 500.0 2022-04-26T09:26:15.971000+00:07 False 600.0 Europe 102
24 CUST_00 vol-03a14dfdaf5c6700f EBS 100.0 snap-0ed7eb835e8501hm10 2022-03-06 09:26:15.971 500.0 2022-04-26T09:26:15.971000+00:07 False 600.0 Europe 102
25 CUST_00 vol-03a14dfdaf5c6700f EBS 100.0 snap-0ed7eb835e8501hm11 2022-03-06 09:26:15.971 500.0 2022-04-26T09:26:15.971000+00:07 False 600.0 Europe 102
26 CUST_00 vol-03a14dfdaf5c6700f EBS 100.0 snap-0ed7eb835e8501hm12 2022-03-06 09:26:15.971 500.0 2022-04-26T09:26:15.971000+00:07 False 600.0 Europe 102
27 CUST_00 vol-03a14dfdaf5c6700f EBS 100.0 snap-0ed7eb835e8501hm13 2022-03-06 09:26:15.971 500.0 2022-04-26T09:26:15.971000+00:07 False 600.0 Europe 102
28 CUST_00 vol-03a14dfdaf5c6700f EBS 100.0 snap-0ed7eb835e8501hm14 2022-03-06 09:26:15.971 500.0 2022-04-26T09:26:15.971000+00:07 False 600.0 Europe 102
29 CUST_00 vol-03a14dfdaf5c6711g OnPrem 120.0 snap-0ed7eb835e8501hm15 2022-01-27 09:26:15.971 50.0 2022-04-27T09:26:15.971000+00:07 True 150.0 North America 140
30 CUST_00 vol-03a14dfdaf5c6711g OnPrem 120.0 snap-0ed7eb835e8501hm16 2022-01-27 09:26:15.971 50.0 2022-04-27T09:26:15.971000+00:07 True 150.0 North America 140
31 CUST_00 vol-03a14dfdaf5c6711g OnPrem 120.0 snap-0ed7eb835e8501hm17 2022-01-27 09:26:15.971 50.0 2022-04-27T09:26:15.971000+00:07 True 150.0 North America 140
32 CUST_00 vol-03a14dfdaf5c6711g OnPrem 120.0 snap-0ed7eb835e8501hm18 2022-01-27 09:26:15.971 50.0 2022-04-27T09:26:15.971000+00:07 True 150.0 North America 140
33 CUST_00 vol-03a14dfdaf5c6711g OnPrem 120.0 snap-0ed7eb835e8501hm19 2022-01-27 09:26:15.971 50.0 2022-04-27T09:26:15.971000+00:07 True 150.0 North America 140
34 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm20 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
35 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm21 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
36 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm22 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
37 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm23 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
38 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm24 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
39 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm25 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
40 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm26 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
41 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm27 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
42 CUST_00 vol-03a14dfdaf5c6722f EBS 600.0 snap-0ed7eb835e8501hm28 2021-06-01 09:26:15.971 1000.0 2022-04-27T09:26:15.971000+00:07 True 2000.0 Europe 380
43 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm29 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
44 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm30 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
45 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm31 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
46 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm32 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
47 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm33 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
48 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm34 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
49 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm35 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
50 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm36 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
51 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm37 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
52 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm38 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
53 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm39 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
54 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm40 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
55 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm41 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
56 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm42 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
57 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm43 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
58 CUST_00 vol-03a14dfdaf5c6733l EBS 1100.0 snap-0ed7eb835e8501hm44 2021-09-01 09:26:15.971 400.0 2022-04-27T09:26:15.971000+00:07 False 430.0 North America 288
In [ ]:
# !jupyter nbconvert --to html ElasticBlockStore-Demo-Sriram.ipynb
In [ ]:
month_list = ['April','April','May','May','June','June']
cost_list = [1400,1740,1320,1570,790,1030]
type_list = ['EBS','OnPrem','EBS','OnPrem','EBS','OnPrem']
costs_df = pd.DataFrame(list(zip(type_list, cost_list, month_list)),columns=['type','cost','month'])
fig = px.bar(costs_df, x="month", y="cost", color="type",color_discrete_sequence=[color_sequence[2],color_sequence[0]])
create_html(fig,'cost_3')
fig.show()
In [ ]: